package cn.ren.cloud.service.impl;

import cn.ren.cloud.domain.PayFlow;
import cn.ren.cloud.mapper.PayFlowMapper;
import cn.ren.cloud.service.IPayFlowService;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author Ren
 * @since 2023-01-10
 */
@Service
public class PayFlowServiceImpl extends ServiceImpl<PayFlowMapper, PayFlow> implements IPayFlowService {

    /**
     * 查询订单ID
     *
     * @param orderNo
     * @return
     */
    @Override
    public PayFlow selectByOrderNo(String orderNo) {
        Wrapper<PayFlow> wrapper = new EntityWrapper<>();
        wrapper.eq("out_trade_no", orderNo);
        return selectOne(wrapper);
    }
}
